package com.authsphere.springboot.starter.plugin;

import com.authsphere.plugin.DecryptBeforePlugin;
import com.authsphere.plugin.config.DecryptConfig;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @program: AuthSphere
 * @description:
 * @author: YuKai Fan
 * @create: 2025/3/28 20:58
 **/
@Configuration
public class DecryptPluginConfiguration {

    @Bean
    @ConfigurationProperties(prefix = "authsphere.plugin.decrypt")
    public DecryptConfig decryptConfig() {
        return new DecryptConfig();
    }

    @Bean
    public DecryptBeforePlugin decryptBeforePlugin(DecryptConfig decryptConfig) {
        return new DecryptBeforePlugin(decryptConfig);
    }
}
